package com.etl.es.charts.base;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

public class AggregationCondition implements Serializable {

    private static final long serialVersionUID = 7582683202535327938L;
    /**
     * 聚合字段
     */
    public static final String AGGREGATION_FIELD_ORDER_PRICE = "orderPrice";
    public static final String AGGREGATION_FIELD_GOODS_PRICE = "goodsPrice";
    public static final String AGGREGATION_FIELD_GOODS_COUNT = "goodsCount";

    /**
     * 搜索ES索引
     */
    private List<String> searchIndices;

    /**
     * 图表列名数组
     */
    private List<String> chartColumns = Arrays.asList("name", "value");

    /**
     * 聚合名称
     */
    private String aggregationName = "aggregation_name";
    /**
     * 聚合字段
     */
    private String aggregationField;

    /**
     * 分组名称
     */
    private String groupName = "group_name";

    /**
     * 分组字段
     */
    private String groupField;

    /**
     * 排序字段
     */
    private String orderField = "aggregation_name";

    /**
     * 是否升序
     */
    private Boolean orderAsc = Boolean.FALSE;

    /**
     * 返回最大数量
     */
    private Integer maxSize = 5;

    public List<String> getSearchIndices() {
        return searchIndices;
    }

    public void setSearchIndices(List<String> searchIndices) {
        this.searchIndices = searchIndices;
    }

    public List<String> getChartColumns() {
        return chartColumns;
    }

    public void setChartColumns(List<String> chartColumns) {
        this.chartColumns = chartColumns;
    }

    public String getAggregationName() {
        return aggregationName;
    }

    public void setAggregationName(String aggregationName) {
        this.aggregationName = aggregationName;
    }

    public String getAggregationField() {
        return aggregationField;
    }

    public void setAggregationField(String aggregationField) {
        this.aggregationField = aggregationField;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getGroupField() {
        return groupField;
    }

    public void setGroupField(String groupField) {
        this.groupField = groupField;
    }

    public String getOrderField() {
        return orderField;
    }

    public void setOrderField(String orderField) {
        this.orderField = orderField;
    }

    public Boolean getOrderAsc() {
        return orderAsc;
    }

    public void setOrderAsc(Boolean orderAsc) {
        this.orderAsc = orderAsc;
    }

    public Integer getMaxSize() {
        return maxSize;
    }

    public void setMaxSize(Integer maxSize) {
        this.maxSize = maxSize;
    }
}
